package cn.hackcloud.designpattern.decorator;

public class Decorator extends Drink {
	private Drink drink;

	@Override
	float cost() {
		return super.getPrice() + drink.cost();
	}

	public Decorator(Drink drink) {
		super();
		this.drink = drink;
	}

	@Override
	public String getDes() {
		return des + " " + getPrice() + "&&" + drink.getDes();
	}

}
